<?php
/*
	[BuyPg] (C) 2010-2011 Buypg
	$Id: NbGaishanModel.class.php 2011-5-16 17:00:26 wufujun $
*/
if (!defined('THINK_PATH')) {
	exit('Access Denied');
}

class NbGaishanModel extends Model{
	//自动验证
	protected $_validate = array(
		array('gaishan_title','require','改善标题不能为空',0),
		array('gaishan_content','require','投诉内容不能为空',0),
	);
	
	//自动填充
	protected $_auto = array(
		array('gaishan_content' , 'formattext' , 3 , 'callback'),
		array('gaishan_date' ,'getTimeToStr' , 1 , 'function'),
	);
	
	//格式化内容
	protected function formattext($str){
		import("@.ORG.Input");
		return Input::nl2Br(Input::deleteHtmlTags($str));
	}
}
?>